<!DOCTYPE HTML>
<html xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <link rel="stylesheet" href="../css/currency/bootstrap.css"/>
    <link href="../css/H-ui.min.css" rel="stylesheet" type="text/css"/>
    <link href="../css/H-ui.admin.css" rel="stylesheet" type="text/css"/>
    <link href="../css/style.css" rel="stylesheet" type="text/css"/>
    <link href="../lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" href="../css/recipe.css"/>
    <style>.exp {
        float: left;
        width: 300px;
    }</style>
    <title>平台点位管理</title>
</head>
<body>
<nav class="breadcrumb" style="margin-bottom:0px"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span
        class="c-gray en">&gt;</span> 数据报表<span class="c-gray en">&gt;</span>平台点位管理列表
    <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px"
       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="pd-20" id="platformPosition">
    <div class="text-c" id="platformPositionList">
        <div id="storeHead">
            <form search-form>
                <input type="text" class="input-text" id="keyword" style="width:200px" placeholder="门店号/位置编号"
                       autocomplete="off" v-model="condition.key">
                <input id="hiddenText" type="text" style="display:none" class="input-text">

                <span class="select-box" style="width:150px;">
                    <select id="positionStatus" class="select" v-model="condition.positionStatus">
                        <option value="">-请选择状态-</option>
                        <option value="0">失效</option>
                        <option value="1">有效</option>
                    </select>
                </span>
                <span class="select-box" style="width:150px; ">
                    <select id="actionStatus" class="select" v-model="condition.actionStatus">
                        <option value="">-请选择点位部署情况-</option>
						<option value="0">未部署</option>
                        <option value="1">已部署</option>
                    </select>
                </span>
                <span class="select-box" style="width:150px; ">
                    <select id="platformPositionType" class="select" v-model="condition.platformPositionType">
                        <option value="">-请选择平台-</option>
						<option value="2">美数平台</option>
                        <option value="3">百度平台</option>
                        <option value="4">点屏平台</option>
						<option value="5">易售平台</option>
						<option value="6">钼媒平台</option>
                    </select>
                </span>
                <span class="select-box" style="width:110px;">
                    <select id="province" class="select" v-model="condition.province" @change="setCitys">
                        <option value="">-请选择省份-</option>
						<option v-for="p in condition.provinces" :value="p">{{p.name}}</option>
                    </select>
                </span>
                <span class="select-box" style="width:110px;">
                    <select id="city" class="select" v-model="condition.city" @change="setAreas">
                        <option value="">-请选择市-</option>
						<option v-for="p in condition.citys" :value="p">{{p.name}}</option>
                    </select>
                </span>
                <span class="select-box" style="width:120px;">
                    <select id="area" class="select" v-model="condition.area">
                        <option value="">-请选择区/县-</option>
						<option v-for="p in condition.areas" :value="p">{{p.name}}</option>
                    </select>
                </span>
                <div id="selectBtnEnter" class="btn btn-primary" v-on:click="getList('search')">查询</div>
                <span>
                <a class="btn btn-primary radius addFormula" style="float: right" id="export" v-on:click="exportStore()">导出{{pageInfo.total}}条数据</a>
            </span>
            </form>
            <div class="cl pd-5 bg-1 bk-gray mt-20">
                <span class="select-box" style="width:150px; float: left">
                    <select id="platformType" class="select" v-model="condition.platformType">
                        <option value="">-请选择平台-</option>
						<option value="2">美数平台</option>
                        <option value="3">百度平台</option>
                        <option value="4">点屏平台</option>
						<option value="5">易售平台</option>
						<option value="6">钼媒平台</option>
                    </select>
                </span>
                <span class="l mr-5"></span>
                <span class="l mr-5"><a class="btn btn-primary radius addFormula" id="addButton"
                                        v-on:click="importPostion">导入</a></span>
                <span class="l mr-5"><a class="btn btn-primary radius addFormula" id="downBtn"
                                        v-on:click="updateStatus('0')">失效</a></span>
                <span class="l mr-5"><a class="btn btn-primary radius addFormula" id="upBtn"
                                        v-on:click="updateStatus('1')">有效</a></span>

                <span class="l mr-5"><a class="btn btn-primary radius addFormula" id="downBtn1"
                                        v-on:click="updateActionStatus('0')">未部署</a></span>
                <span class="l mr-5"><a class="btn btn-primary radius addFormula" id="upBtn1"
                                        v-on:click="updateActionStatus('1')">已部署</a></span>

                <span class="l mr-5"><a class="btn btn-primary radius addFormula" id="delBtn"
                                        v-on:click="dels()">删除</a></span>
                <span class="r" v-cloak>共有数据：{{pageInfo.total}}条</span>
            </div>
        </div>
        <form>
            <table class="table table-border table-bordered table-bg" id="store">
                <thead>
                <tr class="text-c">
                    <!--TODO 生成表头-->
                    <td><input type="checkbox" id="all" value="全选" v-model="condition.all" @click="checkAll"></td>
                    <th nowrap="nowrap" >位置编号</th>
                    <th nowrap="nowrap">平台类型</th>
                    <th nowrap="nowrap" >省</th>
                    <th nowrap="nowrap" >市</th>
                    <th nowrap="nowrap" >区</th>
                    <th nowrap="nowrap" >品牌</th>
                    <th nowrap="nowrap">门店名称</th>
                    <th nowrap="nowrap">百度地图poi名称</th>
                    <th nowrap="nowrap">高德地图poi名称</th>
                    <th nowrap="nowrap">腾讯地图poi名称</th>
                    <th nowrap="nowrap">百度地图GPS位置</th>
                    <th nowrap="nowrap">详细地址</th>
                    <th nowrap="nowrap">MAC地址</th>
                    <th nowrap="nowrap">IP地址</th>
                    <th nowrap="nowrap">状态</th>
                    <th nowrap="nowrap">部署状态</th>
                    <th nowrap="nowrap" width='9.091%'>操作</th>
                </tr>
                </thead>
                <tbody v-cloak>
                <tr class="text-c" v-for="(item,index) in pageInfo.list">
                    <td><input type="checkbox" :value="item.id" v-model="condition.items" name="id"></td>
                    <td nowrap="nowrap">{{item.postionCode}}</td>
                    <td nowrap="nowrap">
                        <span v-if="item.platformType=='2'">美数平台</span>
                        <span v-else-if="item.platformType=='3'">百度平台</span>
                        <span v-else-if="item.platformType=='4'">点屏平台</span>
                        <span v-else-if="item.platformType=='5'">易售平台</span>
                        <span v-else-if="item.platformType=='6'">钼媒平台</span>
                    </td>
                    <td nowrap="nowrap">{{item.province}}</td>
                    <td nowrap="nowrap">{{item.city}}</td>
                    <td nowrap="nowrap">{{item.area}}</td>
                    <td nowrap="nowrap">{{item.shop}}</td>
                    <td nowrap="nowrap">{{item.shopName}}</td>
                    <td nowrap="nowrap">{{item.baiduMap}}</td>
                    <td nowrap="nowrap">{{item.gaodeMap}}</td>
                    <td nowrap="nowrap">{{item.tenxunMap}}</td>
                    <td nowrap="nowrap">{{item.baidugps}}</td>
                    <td nowrap="nowrap">{{item.address}}</td>
                    <td nowrap="nowrap">{{item.mac}}</td>
                    <td nowrap="nowrap">

                    <span v-if="item.ip===undefined || item.ip===null || item.ip===''">
                            <a class="btn btn-primary radius" @click="getIP(item.id,item.postionCode)">获取IP</a>
                    </span>
                    <span v-else-if="item.ip!== undefined ||item.ip=== null">{{item.ip}}</span>
                    </td>
                    <td nowrap="nowrap">
                        <span style="color: #A60000" v-if="item.positionStatus=='0'">失效</span>
                        <span style="color: #4cd964" v-else-if="item.positionStatus=='1'">有效</span>
                    </td>
                    <td nowrap="nowrap">
                        <span style="color: #A60000" v-if="item.actionStatus=='0'">未部署</span>
                        <span style="color: #4cd964" v-else-if="item.actionStatus=='1'">已部署</span>
                    </td>
                    <td nowrap="nowrap">
                        <a class="btn btn-primary radius" @click="updateInit(index)">修改</a>
                        <a class="btn btn-primary radius" @click="del(index)">刪除</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </form>
        <div class="pageBox" v-cloak id="pageBox">
            <div class="pageInfo">显示 <span id="startRow">{{pageInfo.startRow}}</span> 到 <span id="endRow">{{pageInfo.endRow}}条</span>&nbsp;&nbsp;&nbsp;&nbsp;{{pageInfo.pages}}页&nbsp;&nbsp;&nbsp;&nbsp;共
                <span id="total">{{pageInfo.total}}</span> 条
                <select v-model="selectedPageSize" v-on:change="getList('changePageSize')">
                    <option value="5">5</option>
                    <option value="10">10</option>
                    <option value="15">15</option>
                    <option value="20">20</option>
                    <option value="50">50</option>
                </select>
            </div>
            <ul class="pagination" id="pagination"></ul>
        </div>
        <div class="tips" id="noData" align="center" style="display: none">
            无数据
        </div>
    </div>
    <!--TODO 添加、更新弹窗-->
    <form class="form form-horizontal" id="addPanel" style="display: none">
        <table class="table" border='0' width='100%'>
            <tr>
                <td width="30%" align="right" nowrap="nowrap"></td>
                <td width="30%" style="margin-left: 0px"></td>
                <td width="40%"></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">位置编号：</label></td>
                <td><input type="text" class="input-text radius" name="postionCode" v-model="postionCode"
                           placeholder="位置编号" readonly unselectable="on"/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo" v-if="postionCodeErr!=''" readonly
                          unselectable="on">{{postionCodeErr}} </span>
                </td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">省：</label></td>
                <td><input type="text" class="input-text radius" name="province" v-model="province" placeholder="省"/>
                </td>
                <td><span class="Validform_checktip Validform_wrong errorInfo"
                          v-if="provinceErr!=''">{{provinceErr}} </span></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">市 ：</label></td>
                <td><input type="text" class="input-text radius" name="city" v-model="city" placeholder="市 "/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo" v-if="cityErr!=''">{{cityErr}} </span>
                </td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">区 ：</label></td>
                <td><input type="text" class="input-text radius" name="area" v-model="area" placeholder="区 "/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo" v-if="areaErr!=''">{{areaErr}} </span>
                </td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">品牌 ：</label></td>
                <td><input type="text" class="input-text radius" name="shop" v-model="shop" placeholder="品牌"/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo" v-if="shopErr!=''">{{shopErr}} </span>
                </td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">门店名称 ：</label></td>
                <td><input type="text" class="input-text radius" name="shopName" v-model="shopName" placeholder="门店名称 "/>
                </td>
                <td><span class="Validform_checktip Validform_wrong errorInfo"
                          v-if="shopNameErr!=''">{{shopNameErr}} </span></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px"> 百度地图poi名称 ：</label>
                </td>
                <td><input type="text" class="input-text radius" name="baiduMap" v-model="baiduMap"
                           placeholder="百度地图poi名称 "/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo"
                          v-if="baiduMapErr!=''">{{baiduMapErr}} </span></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">高德地图poi名称 ：</label></td>
                <td><input type="text" class="input-text radius" name="gaodeMap" v-model="gaodeMap"
                           placeholder="高德地图poi名称 "/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo"
                          v-if="gaodeMapErr!=''">{{gaodeMapErr}} </span></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">腾讯地图poi名称 ：</label></td>
                <td><input type="text" class="input-text radius" name="tenxunMap" v-model="tenxunMap"
                           placeholder="腾讯地图poi名称 "/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo"
                          v-if="tenxunMapErr!=''">{{tenxunMapErr}} </span></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">百度地图GPS位置 ：</label></td>
                <td><input type="text" class="input-text radius" name="baidugps" v-model="baidugps"
                           placeholder="百度地图GPS位置 "/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo"
                          v-if="baidugpsErr!=''">{{baidugpsErr}} </span></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">详细地址：</label></td>
                <td><input type="text" class="input-text radius" name="address" v-model="address" placeholder="详细地址"/>
                </td>
                <td><span class="Validform_checktip Validform_wrong errorInfo"
                          v-if="addressErr!=''">{{addressErr}} </span></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">MAC地址：</label></td>
                <td><input type="text" class="input-text radius" name="mac" v-model="mac" placeholder="MAC地址"/>
                </td>
                <td><span class="Validform_checktip Validform_wrong errorInfo"
                          v-if="macErr!=''">{{macErr}} </span></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">IP地址：</label></td>
                <td><input type="text" class="input-text radius" name="ip" v-model="ip" placeholder="IP地址"/>
                </td>
                <td><span class="Validform_checktip Validform_wrong errorInfo"
                          v-if="ipErr!=''">{{ipErr}} </span></td>
            </tr>
            <tr>
                <td class="text-r"></td>
                <td class="text-c">
                    <a class="btn btn-primary radius" id="addCancel" v-on:click="reset">重置</a>
                    <a class="btn btn-primary radius" id="saveDictType" v-on:click="save">保存</a>
                </td>
                <td></td>
            </tr>
        </table>
    </form>
    <form class="form form-horizontal" id="importPanel" style="display: none" enctype="multipart/form-data"
          method="post">
        <table class="table" border='0' width='100%'>
            <tr>
                <td width="20%" align="right" nowrap="nowrap"></td>
                <td width="40%" style="margin-left: 0px"></td>
                <td width="40%"></td>
            </tr>
            <tr id="t1">
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px"><span
                        class="c-red">*</span>位置数据文件：</label></td>
                <td><input type="file" class="input-text radius" name="file" placeholder="请选择导入的数据文件" id="file"/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo" v-if="fileErr!=''">{{fileErr}}</span>
                </td>
            </tr>
            <tr>
                <td width="100%" class="text-r" colspan="3"><a class="btn btn-primary radius f-l ml-50 "
                                                               style="width: 180px;" id="" v-on:click="importB">保存</a>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <div class="f-l ml-50 errMsg error-msg" style="height: 70px;width: 500px">
                    </div>
                </td>
            </tr>
        </table>
    </form>
</div>
</body>
</html>
<script type="text/javascript" src="../js/common/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="../lib/layer/1.9.3/layer.js"></script>
<script type="text/javascript" src="../lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="../lib/icheck/jquery.icheck.min.js"></script>
<script type="text/javascript" src="../lib/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="../lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="../js/common/H-ui.js"></script>
<script type="text/javascript" src="../js/common/H-ui.admin.js"></script>
<script type="text/javascript" src="../js/utils/utils.js"></script>
<script type="text/javascript" src="../js/currency/vue.js"></script>
<script type="text/javascript" src="../js/currency/vue-resource.min.js"></script>
<script type="text/javascript" src="../js/currency/base.js"></script>
<script type="text/javascript" src="../js/currency/jqPaginator.js"></script>
<script type="text/javascript" src="../js/platformPosition.js"></script>
